package cn.itcast.myapplication.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import cn.itcast.myapplication.R;
import cn.itcast.myapplication.lifecycle.MyLifeCycles;

public class HomePage1Activity extends AppCompatActivity implements View.OnClickListener{

    Button button10,button12;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_page1);

        button10=(Button)findViewById(R.id.button10);

        button12=(Button)findViewById(R.id.button12);

        button10.setOnClickListener(this);

        button12.setOnClickListener(this);

    }


    @Override
    public void onClick(View view) {

        switch (view.getId()){

            case R.id.button10:

                Intent button10=new Intent(HomePage1Activity.this, MyLifeCycles.class);

                startActivity(button10);

                break;

            case  R.id.button12:

                Intent button12=new Intent(HomePage1Activity.this,RoomBasic.class);

                startActivity(button12);

        }
    }
}